package com.sdhs.paas.sdk.core;

/**
 * 基础异常类
 *
 * @author wjj
 *
 */
public class PaasBaseException extends RuntimeException {

	/**
	 * 
	 */
	private static final long serialVersionUID = -4611856649284024358L;

	private String paasExceptionCode = PaasResponseEnum.FAIL.code();
	private String paasExceptionMsg = PaasResponseEnum.FAIL.msg();

	public PaasBaseException() {
		super(PaasResponseEnum.FAIL.msg());
	}

	public PaasBaseException(String paasExceptionCode, String paasExceptionMsg) {
		super(paasExceptionMsg);
		init(paasExceptionCode, paasExceptionMsg);
	}

	public PaasBaseException(String message, String paasExceptionCode, String paasExceptionMsg) {
		super(message);
		init(paasExceptionCode, paasExceptionMsg);
	}

	public PaasBaseException(String message, Throwable cause, String paasExceptionCode, String paasExceptionMsg) {
		super(message, cause);
		init(paasExceptionCode, paasExceptionMsg);
	}

	public PaasBaseException(Throwable cause, String paasExceptionCode, String paasExceptionMsg) {
		super(cause);
		init(paasExceptionCode, paasExceptionMsg);
	}

	private void init(String paasExceptionCode, String paasExceptionMsg) {
		this.paasExceptionCode = paasExceptionCode;
		this.paasExceptionMsg = paasExceptionMsg;
	}

	public String getPaasExceptionCode() {
		return paasExceptionCode;
	}

	public void setPaasExceptionCode(String paasExceptionCode) {
		this.paasExceptionCode = paasExceptionCode;
	}

	public String getPaasExceptionMsg() {
		return paasExceptionMsg;
	}

	public void setPaasExceptionMsg(String paasExceptionMsg) {
		this.paasExceptionMsg = paasExceptionMsg;
	}

}